import request from '@/utils/request'

// 查询兑换记录列表
export function listExchangeRecord(query) {
  return request({
    url: '/system/exchange/list',
    method: 'get',
    params: query
  })
}

// 查询兑换记录详细
export function getExchangeRecord(exchangeId) {
  return request({
    url: '/system/exchange/' + exchangeId,
    method: 'get'
  })
}

// 删除兑换记录
export function delExchangeRecord(exchangeId) {
  return request({
    url: '/system/exchange/' + exchangeId,
    method: 'delete'
  })
}

// 导出兑换记录
export function exportExchangeRecord(query) {
  return request({
    url: '/system/exchange/export',
    method: 'get',
    params: query
  })
} 

// 统计数据
export function totalExchangeRecord(startTime,endTime) {
  return request({
    url: '/system/exchange/totalExchangeRecord',
    method: 'get',
    params: {
      startTime: startTime,
      endTime: endTime
    }
  })
}

// 统计数据
export function totalExchangeList(row) {
  return request({
    url: '/system/exchange/totalExchangeList',
    method: 'post',
    data: row
  })
}